<%@ page import="com.zhiyou100.entityclass.Student" %>
<%@ page import="com.zhiyou100.dao.StudentDao" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.Collections" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: yang
  Date: 7/20/20
  Time: 19:53
  To change this template use File | Settings | File Templates.
--%>
<%@page contentType="text/html; charset=UTF-8" language="java" errorPage="error.jsp" %>
<link rel="stylesheet" href="${theProjectName}/css/login.css" >
<html>
<head>
    <title>获取所有</title>
</head>
<body>
<c:if test="${user != true}">
    <%--  没有登陆，转发到登陆页面   --%>
    <c:redirect url="/jsp/login.jsp"/>
</c:if>
<h2 align="center">
   <a href="${theProjectName}/jsp/home.jsp"> 回到主页</a>
</h2>
<table border="1" style="width: 800px">
    <tr>
        <td>学生 id</td>
        <td>学生姓名</td>
        <td>学生性别</td>
        <td>学生年龄</td>
        <td>老师 id</td>
    </tr>
    <c:forEach varStatus="i" var="n" items="${allStudent}">
        <tr>
            <td>${n.sid}</td>
            <td>${n.sname}</td>
            <td>${n.sex}</td>
            <td>${n.sage}</td>
            <td>${n.scid}</td>
        </tr>
    </c:forEach>
</table>


</body>
</html>
